<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>遇见 | 自信的你</title>
  <meta name="description" content="这是一个 index 页面">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" href="assets/i/favicon.ico">
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="assets/css/amazeui.min.css" />
  <link rel="stylesheet" href="assets/css/admin.css">
  <link rel="stylesheet" href="assets/css/app.css">
  
  <style type="text/css">
  	.btn-login{
		width: 100%;
		border-radius: 6px;
		background: #53d192;
		border: none;
		color: #fff;
		font-size: 14px;
		line-height: 40px;
  	}
  	
  </style>
  
</head>

<body data-type="login">

  <div class="am-g myapp-login">
	<div class="myapp-login-logo-block  tpl-login-max">
		<div class="myapp-login-logo-text">
			<div class="myapp-login-logo-text">
				Meet<span> Login</span> <i class="am-icon-skyatlas"></i>
				
			</div>
		</div>
		<div class="login-font">
			 <i id="login-id">登陆 </i> or <span id="register-id"> 注册</span> 
		<!--  <p class="login-box-msg" style="color: white" 
		  >Sign in to start your session</p> -->
<!-- 			<i>Log In </i> or <span> Sign Up</span> -->
		</div>
		<div class="am-u-sm-10 login-am-center">
			<form class="am-form">
				<fieldset>
					<div class="am-form-group">
						<input type="text" class="" id="usernameId" placeholder="请输入会员账号">
					</div>
					<div class="am-form-group">
						<input type="password" class="" id="passwordId" placeholder="请输入密码">
					</div>
					 <p><button type="submit" class="am-btn am-btn-default">登录</button></p> 
				</fieldset>
			</form>
		</div>
	</div>
</div>

  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/amazeui.min.js"></script>
  <script src="assets/js/app.js"></script>
</body>
<script type="text/javascript">
$(function () {
    $(".am-btn-default").click(doLogin);
    
    $("#register-id").click(doRegisterUI);
    
});

function doRegisterUI(){
	location.href="www.meet.com/register";
}

function doLogin(){
	debugger
	var url="member/doLogin";
	var params={
	"memberName":$("#usernameId").val(),
	"password":$("#passwordId").val()
	}
	$.post(url,params,function(result){
		 if(result.state==1){
			//跳转到indexUI对应的页面
			location.href="doIndexUI";
		 }else{
			 alert(result.message);
		 }
		 return false;//防止刷新时重复提交
	});
	
}
</script>

</html>